package com.ohc;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;

/**
 * @Author 欧皓辰
 * @Date 2021/12/28 10:40
 * @Version 1.0
 */
public class Test {
    public static void main(String[] args) {
        RuntimeException runtimeException = new RuntimeException();
        ArrayList<Integer> list = new ArrayList<>();
        LinkedList<Integer> linkedList = new LinkedList<>();
        linkedList.add(1);
        linkedList.add(2);
        linkedList.add(3);
        Iterator<Integer> integerIterator = linkedList.iterator();
        while (integerIterator.hasNext()) {
            System.out.println("integerIterator.next() = " + integerIterator.next());
        }
        HashMap<String, Object> map = new HashMap<>();
        Iterator<Integer> iterator = list.iterator();
        while (iterator.hasNext()) {
            System.out.println("iterator.next() = " + iterator.next());
        }
    }

}
